package com.htgd.gardenexpo.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
public class MyCouponVO {

    @ApiModelProperty(value = "id")
    private Integer id;

    @ApiModelProperty(value = "couponId")
    private Integer couponId;

    @ApiModelProperty(value = "优惠券名称")
    private String name;

    @ApiModelProperty(value = "优惠券类型（1抵扣券）")
    private Integer type;

    @ApiModelProperty(value = "类型名称")
    private String typeName;

    @ApiModelProperty(value = "面额")
    private BigDecimal amount;

    @ApiModelProperty(value = "使用条件类型（0无条件，1满减）")
    private Integer conditionType;

    @ApiModelProperty(value = "类目id")
    private Integer categoryId;

    @ApiModelProperty(value = "类目名称")
    private String categoryName;

    @ApiModelProperty(value = "满xx可用")
    private BigDecimal reductionAmount;

    @ApiModelProperty(value = "有效期类型（1长期，2多少天后，3固定时间）")
    private Integer validityType;

    @ApiModelProperty(value = "固定天数")
    private Integer fixedDays;

    @ApiModelProperty(value = "固定日期")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private LocalDate fixedTime;

    @ApiModelProperty(value = "说明")
    private String description;

    @ApiModelProperty(value = "使用条件")
    @TableField(exist = false)
    private String conditionText;

    @ApiModelProperty(value = "使用时间")
    @TableField(exist = false)
    private String timeText;

    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    private LocalDateTime createTime;


}
